#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>
#include<ctype.h>
int main()
{
    char c;
    scanf("%c", &c);
    if (islower(c))
        printf("%c", toupper(c));
    else if (isupper(c))
        printf("%c", tolower(c));
    else
        printf("%c", c);
    return 0;
}